<?phpnamespace Album\Model;use Zend\Db\TableGateway\TableGateway;class CategoryTable{    protected $tableGateway;    public function __construct(TableGateway $tableGateway)    {        $this->tableGateway = $tableGateway;    }    public function fetchAll()    {        $resultSet = $this->tableGateway->select();                $resultSet->buffer();                $resultSet->next();        return $resultSet;    }}